package service;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public abstract class Event implements Serializable {
	
	protected String type;
	protected Date timestamp;
	protected DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss z");
	protected static int idcounter = 0;
	protected final int id = idcounter;
	
	protected Event(String type) {
		this.type=type;
		timestamp=new Date();
		idcounter++;
	}
	
	public String getType() {
		return type;
	}
	public Date getTimestamp() {
		return timestamp;
	}
	public int getId() {
		return id;
	}
	
	
	
}
